Robot programming apparatus for creating robot program for capturing image of workpiece

ABSTRACT

A robot programming apparatus includes a virtual space creation unit for creating a virtual space that expresses a work space in three dimensions; a target portion designation unit for designating a target portion whose image is to be captured by an image pickup device, on a workpiece model arranged in the virtual space; a position determination unit for determining at least one position of the image pickup device for capturing the image of the target portion in the virtual space; a position storage unit for storing the at least one position of the image pickup device; and an image pickup program creation unit for creating an image pickup program to be taught to a robot so that the image pickup device captures the image of the target portion according to the at least one position of the image pickup device stored in the position storage unit.

RELATED APPLICATIONS

The present application claims priority to Japanese Application Number2014-011419, filed Jan. 24, 2014, the disclosure of which is herebyincorporated by reference herein in its entirety.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a robot programming apparatus forcreating a robot program to be taught to a robot used to process aworkpiece.

2. Description of the Related Art

There is known a structure for a robot system used to process aworkpiece, which is provided with an image pickup device for capturingan image of a portion of the workpiece that is to be processed. Sinceworkpieces vary in shape depending on individual ones, a workpieceprocessing program is corrected by capturing an image of a portion to beprocessed using an image pickup device and processing the obtainedimage. JP-A-06-328385, JP-A-2002-086376, JP-A-2003-191194,JP-A-2007-160486, and JP-A-2009-303013 disclose various techniques fordetermining a position and a posture of a visual sensor to detect atarget object.

JP-A-06-328385 discloses a posture control method for controlling aposture of a visual sensor so that a position of a target portion to bewelded can be detected. In this technique, the posture of the visualsensor is controlled in each sampling cycle so that a detection targetis always arranged in the center of a visual field of the visual sensoreven when a tool moves.

JP-A-2002-086376 discloses a guiding method for guiding a visual sensorattached to a tip of a hand of a manipulator to a target object to bedetected. In this technique, a position for guiding the sensor isdetermined based on an approximate position of the target object and adistance between a predetermined position for guiding the sensor and thetarget object.

JP-A-2003-191194 discloses correcting the position for guiding a visualsensor in the technique disclosed in JP-A-2002-086376, according to adesignated offset in order to avoid an obstacle positioned around theposition for guiding the visual sensor.

JP-A-2007-160486 discloses an off-line programming apparatus configuredto automatically create a measurement program for capturing an image ofa reference point of a workpiece using a visual sensor.

JP-A-2009-303013 discloses an image pickup direction determinationprogram for determining an image capturing direction of an image pickupapparatus configured to capture an image of a surrounding target objectin order to estimate a present position of a movable robot configured tomove to a predetermined target point.

In the conventional techniques, it is necessary to determine a positionof the image pickup device used to capture an image of the targetportion to be captured. However, determination of the position of theimage pickup device usually requires a lot of time and labor, thusreducing work efficiency. There has thus been a need to determine,efficiently in a short period of time, the position of an image pickupdevice when the image pickup device captures an image of a targetportion.

SUMMARY OF THE INVENTION

According to a first aspect of the present invention, there is providedA robot programming apparatus for creating a robot program to be taughtto a robot which is used to process a workpiece arranged in a workspace, the robot programming apparatus comprising: a virtual spacecreation unit for creating a virtual space that expresses the work spacein three-dimensions; a target portion designation unit for designating atarget portion whose image is to be captured by an image pickup device,on a model of the workpiece arranged in the virtual space; a positiondetermination unit for determining at least one position of the imagepickup device for capturing the image of the target portion by the imagepickup device in the virtual space; a position storage unit for storingthe at least one position of the image pickup device determined by theposition determination unit; and an image pickup program creation unitfor creating an image pickup program to be taught to the robot so thatthe image pickup device captures the image of the target portionaccording to the at least one position of the image pickup device storedin the position storage unit.

According to a second aspect of the present invention, in the robotprogramming apparatus according to the first aspect, the positiondetermination unit is configured to determine the at least one positionof the image pickup device in which the image pickup device has apredetermined positional relationship with respect to the targetportion.

According to a third aspect of the present invention, in the robotprogramming apparatus according to the second aspect, the positiondetermination unit includes a visual field designation unit fordesignating a range of a visual field of the image pickup device and isconfigured to determine the at least one position of the image pickupdevice in which a full image of the target portion can be captured,based on the predetermined positional relationship between the imagepickup device and the target portion and the range of the visual field.

According to a fourth aspect of the invention, the robot programmingapparatus of the third aspect further includes a judgment unit forjudging whether or not the full image of the target portion can becaptured when the image pickup device is arranged in one positiondetermined by the position determination unit, and wherein the positiondetermination unit is configured to determine an additional position ofthe image pickup device different from the one position when thejudgment unit judges that the full image of the target portion cannot becaptured.

According to a fifth aspect of the invention, in the robot programmingapparatus of the fourth aspect, the position determination unit isconfigured, when determining a plurality of positions of the imagepickup device, to determine the plurality of positions of the imagepickup device so that the image pickup device in the respectivepositions adjacent to each other has ranges of visual fields so as tosuperimpose on each other over a predetermined range.

According to a sixth aspect of the invention, in a robot programmingapparatus according to any of the second to the fifth aspects, thepredetermined positional relationship between the image pickup deviceand the target portion is designated by a distance between the imagepickup device and the target portion.

According to a seventh aspect of the invention, in the robot programmingapparatus according to the sixth aspect, the distance between the imagepickup device and the target portion is a distance along a directionperpendicular to a surface of the workpiece including the targetportion.

According to an eighth aspect of the invention, the robot programmingapparatus according to any of the first to the seventh aspects furtherincludes a processing program creation unit for creating a processingprogram for processing the workpiece, based on a shape of the targetportion obtained by simulating the image pickup program in the virtualspace.

According to a ninth aspect of the invention, the robot programmingapparatus according to any of the first to the eighth aspects furtherincludes a processing program creation unit for creating a processingprogram for processing the workpiece, based on an image of the targetportion obtained by executing the image pickup program.

According to a tenth aspect of the invention, in the robot programmingapparatus according to any of the first to the ninth aspects, the targetportion is a point, a line, or a plane on the surface of the workpiece.

According to an eleventh aspect of the invention, in the robotprogramming apparatus according to any of the first to the tenthaspects, the image pickup program includes a teaching content for therobot that controls a position and a posture of at least one of theimage pickup device and the workpiece.

According to a twelfth aspect of the invention, in the robot programmingapparatus according to any of the first to the tenth aspects, the imagepickup program includes a teaching content for teaching the image pickupdevice fixed so as to have a predetermined positional relationshipdetermined by the position determination unit with respect to theworkpiece fixed to a predetermined position, so that the image pickupdevice captures the image of the target portion of the workpiece.

These and other objects, features and advantages of the presentinvention will become more apparent in light of the detailed descriptionof exemplary embodiments thereof as illustrated by the drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic diagram depicting a robot, a workpiece, and animage pickup device attached to the robot arranged in a work space;

FIG. 2 is a functional block diagram of a robot programming apparatusaccording to one embodiment of the present invention;

FIG. 3 is a diagram depicting an exemplary display of a robot, an imagepickup device, and a workpiece arranged in a virtual space;

FIG. 4A is a perspective view depicting an example of a target portionof the workpiece;

FIG. 4B is a perspective view depicting another example of the targetportion of the workpiece;

FIG. 4C is a perspective view depicting another example of the targetportion of the workpiece;

FIG. 5 is a conceptual diagram depicting a visual field of the imagepickup device;

FIG. 6A is an illustration depicting an example of a positionalrelationship between a visual field area of the image pickup device andthe target portion;

FIG. 6B is an illustration depicting the example of the positionalrelationship between the visual field area of the image pickup deviceand the target portion;

FIG. 7A is an illustration depicting another example of the positionalrelationship between the visual field area of the image pickup deviceand the target portion;

FIG. 7B is an illustration depicting the example of the positionalrelationship between the visual field area of the image pickup deviceand the target portion;

FIG. 8A is a diagram depicting a superimposition area in which visualfield areas of image pickup devices arranged in a plurality of positionssuperimpose on each other;

FIG. 8B is a diagram depicting the superimposition area in which thevisual field areas of the image pickup devices arranged in the pluralityof positions superimpose on each other;

FIG. 9A is a diagram for illustrating a determination method fordetermining positions of a plurality of image pickup devices accordingto a superimposition condition;

FIG. 9B is a diagram for illustrating a determination method fordetermining the positions of the plurality of image pickup devicesaccording to another superimposition condition;

FIG. 10 is a flowchart depicting a processing flow executed by the robotprogramming apparatus according to one embodiment of the invention;

FIG. 11 is a schematic diagram depicting a robot, an image pickupdevice, and a workpiece arranged in a work space;

FIG. 12 is a schematic diagram depicting a robot, an image pickupdevice, and a workpiece arranged in a work space;

FIG. 13 is a schematic diagram depicting a robot, an image pickupdevice, and a workpiece arranged in a work space; and

FIG. 14 is a schematic diagram depicting a robot, an image pickupdevice, and a workpiece arranged in a work space.

DETAILED DESCRIPTION OF THE INVENTION

Exemplary embodiments of the present invention will be described belowwith reference to the accompanying drawings. For better understanding ofthe present invention, constituent elements of the embodiments depictedin the drawings vary in scale as necessary.

FIG. 1 is a schematic diagram depicting a robot 100, a workpiece 60, andan image pickup device 50 attached to the robot 100 arranged in a workspace. The robot 100 includes a processing tool 104 attached to a wrist106 at a tip of an arm 102. The robot 100 is operated according to acontrol program taught by a control device 110 and is configured to beable to change a position and a posture thereof as necessary. Thecontrol device 110 includes an input means such as a keyboard and amouse and a storage unit for storing various data and programs. Inaddition, the control device 110 may also include a display unit such asan LCD.

The image pickup device 50 is fixed near the wrist 106. The image pickupdevice 50 is, for example, a visual sensor including an image pickupelement such as a CCD. The image pickup device 50 is adapted to change aposition and a posture thereof in conjunction with the movement of therobot 100.

The workpiece 60 is fixed to a jig 70 such as a workbench arranged nearthe robot 100. The workpiece 60 is, for example, a substantiallyplate-shaped member formed by cutting a surface thereof. The workpiece60 depicted in the drawing has a lower portion 60 a fixed to the jig 70and an upper portion 60 b protruding on a side opposite to a surface ofthe lower portion 60 a in contact with the jig 70. The workpiece 60 isarranged within a movable range of the processing tool 104 attached tothe wrist 106 of the robot 100, in order to execute, for example,deburring processing.

The image pickup device 50 is used, for example, to capture an image ofa processing portion of the workpiece 60 that is to be processed by theprocessing tool 104. Alternatively, the image pickup device 50 may beused to accurately detect a position of a hole formed in the workpiece60.

According to the present embodiment, the robot 100 is controlledaccording to an image pickup program, so as to position the image pickupdevice 50 in a predetermined position with respect to a target portionof the workpiece 60 whose image is to be captured. The image pickupprogram is created by a robot programming apparatus 10. The robotprogramming apparatus 10 may be incorporated in the robot controlapparatus 110 or may be provided separately from the robot controlapparatus 110.

FIG. 2 is a functional block diagram of the robot programming apparatus10 according to one embodiment of the present invention. As depicted inthe drawing, the robot programming apparatus 10 includes a virtual spacecreation unit 12, a target portion designation unit 14, a visual fielddesignation unit 16, a judgment unit 18, a position determination unit20, a position storage unit 22, an image pickup program creation unit24, and a processing program creation unit 26.

The virtual space creation unit 12 has a function of creating a virtualspace that expresses a work space in three dimensions, for example, asdepicted in FIG. 1. The virtual space creation unit 12 is configured toarrange a robot model (hereinafter referred to simply as “robot”) 100, aprocessing tool model (hereinafter referred to simply as “processingtool”) 104, an image pickup device model (hereinafter referred to simplyas “image pickup device”) 50, and a workpiece model (hereinafterreferred to simply as “workpiece”) 60, respectively, in the virtualspace according to a predetermined three-dimensional shape model. Thevirtual space created by the virtual space creation unit 12 and therespective models of the elements arranged in the virtual space aredisplayed on a display unit such as an LCD, which is not shown.

FIG. 3 depicts an exemplary display showing the robot 100, the imagepickup device 50, and the workpiece 60 arranged in the virtual space.When considering only the purpose of determining a position of the imagepickup device 50 with respect to the workpiece 60 in an image pickupstep, the robot 100 and the processing tool 104 may not be displayed.Elements other than the workpiece 60 may be displayed in simplifiedmodels, instead of the three-dimensional shape models. For example, whenthe image pickup device 50 is displayed in the virtual space, any othersimplified models may also be used, as long as the position and a visualline direction of the image pickup device 50 can be visually recognized.

The target portion designation unit 14 has a function of designating atarget portion X whose image to be captured by the image pickup device50 on the workpiece 60 (see FIG. 3) arranged in the virtual space. Thetarget portion X is, for example, a point, a line, or a plane on asurface of the workpiece 60. An operator can designate the targetportion X, for example, by using an arbitrary input means while checkingthe virtual space displayed on the display unit.

FIGS. 4A to 4C are perspective diagrams depicting examples of the targetportion X of the workpiece 60. FIG. 4A indicates a target portion X1defined along an edge of the upper portion 60 b of the workpiece 60 bythick lines. The target portion X1 has a substantially closed shapeincluding a start point Y1 and an end point Y2 adjacent to each other.FIG. 4B indicates a target portion X2 defined at one corner of the upperportion 60 b of the workpiece 60 by a black dot. FIG. 4C indicates atarget portion X3 defined on an upper surface of the upper portion 60 bof the workpiece 60, in which the target portion X3 is indicated byhatching. In the example of FIG. 4C, an entire upper surface of theworkpiece 60 is designated as the target portion X. However, the targetportion X may be designated over a part of the upper surface.

The visual field designation unit 16 has a function of designating avisual field area VA of the image pickup device 50. FIG. 5 is aconceptual diagram depicting a visual field V of the image pickup device50. As depicted in FIG. 5, the visual field V is defined in the virtualspace, for example, as a quadrangular pyramid shape model whose centeraxis line is a visual line VO of the image pickup device 50. Instead ofthe quadrangular pyramid model, a conical or cylindrical shape model maybe used. The visual field area VA indicates a range of the visual fieldV on a plane that is distant, for example, by a height H of the visualfield V from the image pickup device 50 and extends perpendicularly tothe visual line VO. A size of the visual field area VA is determined,for example, by designating a size of a first side S1 and a size of asecond side S2 extending in a direction perpendicular to the first sideS1. Alternatively, information including a focal length of the imagepickup device 50, a size (the number of pixels) of an image to becaptured, and the height H of the visual field may be input to calculatethe size of the visual field area VA from the information.

The position determination unit 20 has a function of determining aposition of the image pickup device 50 for capturing an image of thetarget portion X of the workpiece 60 by the image pickup device 50. Forexample, when a continuous line is designated as the target portion X(see FIG. 4A), the position of the image pickup device 50 is determinedso that the visual field area VA of the image pickup device 50 is flushwith the upper surface of the upper portion 60 b of the workpiece 60 anda center of the visual field area VA coincides with the start point ofthe target portion X (reference sign “Y1” in FIG. 4A). Specifically, theposition determination unit 20 acquires a normal line direction withrespect to the surface of the workpiece 60 including the target portionX from information on the shape of the workpiece 60 and determines aposition distant by the height H of the visual field from the startpoint of the target portion X in the acquired normal line direction, asthe position of the image pickup device.

When the target portion X is a point (see FIG. 4B), the position of theimage pickup device 50 is determined, for example, so that the center ofthe visual field area VA coincides with the target portion X. When thetarget portion X is a plane (see FIG. 4C), the position of the imagepickup device 50 is determined, for example, so that the center of thevisual field area VA coincides with a center of the target portion X. Inthis manner, the position determination unit 20 is configured to be ableto determine the position of the image pickup device 50 with respect tothe target portion X by designating a distance between the targetportion X and the image pickup device 50.

The judgment unit 18 has a function of judging whether or not the imagepickup device 50 can capture a full image of the target portion X, basedon the visual field area VA designated by the visual field designationunit 16 and the position of the image pickup device 50 determined by theposition determination unit 20. For this purpose, for example, when thetarget portion of the workpiece 60 is a line or a plane, the targetportion is converted into a group of points and the judgment unit 18executes the above judgment processing, based on whether or not eachpoint corresponding to the target portion X is included in the range ofthe visual field area VA.

FIGS. 6A and 6B are diagrams depicting an example of a positionalrelationship between the visual field area VA of the image pickup device50 and the target portion X. FIGS. 6A and 6B shows the case in which theedge of the workpiece 60 is designated as the target portion X, asdepicted in FIG. 4A. The image pickup device 50 is arranged in such aposition that the center of the visual field area VA of the image pickupdevice 50 coincides with the start point Y1 of the target portion X andthat the image pickup device 50 is distant by the height H of the visualfield v from the start point Y1 in the normal line direction withrespect to the surface of the workpiece 60.

As can be seen from FIG. 6B, the target portion X of four sides of arectangular shape indicated by thick lines is entirely included in therange of the visual field area VA. In other words, the judgment unit 18judges that the image pickup device 50 arranged in this position cancapture a full image of the target portion X. Accordingly, in this case,the position determination unit 20 completes a step of determining theposition of the image pickup device 50 and outputs the position of theimage pickup device 50 determined at that time to the position storageunit 22.

FIGS. 7A and 7B are diagrams depicting a positional relationship betweenthe visual field area VA of the image pickup device 50 and the targetportion X. In this case, as depicted in FIG. 7B, only a part of thetarget portion X is included in the range of the visual field area VA.Accordingly, the judgment unit 18 judges that the image pickup device 50cannot capture a full image of the target portion X. In this case, theposition determination unit 20 determines an additional position(s) ofthe image pickup device 50. In other words, during an image pickup step,the image pickup device 50 captures images of the target portion X froma plurality of different positions.

The additional position(s) of the image pickup device 50 for capturingimages of the target portion X is sequentially determined by theposition determination unit 20, for example, according to a size of asuperimposition area Z in which the visual field areas VA superimpose oneach other. FIGS. 8A and 8B are diagrams depicting the superimpositionarea Z of the visual field areas VA of the image pickup devices 50arranged in a plurality of positions. FIGS. 8A and 8B depict an imagepickup device 501 having a first visual field V1 and arranged in a firstposition and an image pickup device 502 having a second visual field V2and arranged in a second position, respectively. The drawings alsodepict a superimposition area Z in which a visual field area VA1 of thefirst visual field V1 and a visual field area VA2 of the second visualfield V2 superimpose each other.

For example, the superimposition area Z may be set such that at leastone of a size Z1 in a first direction and a size Z2 in a seconddirection perpendicular to the first direction is less than apredetermined threshold value, or alternatively, such that an area ofthe superimposition area Z becomes less than a predetermined thresholdvalue. In other words, the position determination unit 20 sequentiallydetermines an additional position(s) of the image pickup device 50 thatsatisfies a predetermined superimposition condition, while comparing thesizes Z1 and Z2 or the area of the superimposition area Z with acorresponding threshold value.

FIGS. 9A and 9B are diagrams for illustrating a determination method fordetermining the positions of a plurality of image pickup devices 50according to superimposition conditions. In FIG. 9A, a visual field areaVA1 of the image pickup device 50 arranged in a first position and avisual field area VA2 of the image pickup device 50 arranged in a secondposition are indicated by broken lines, respectively. Thesuperimposition area Z in which those visual field areas VA1 and vA2superimpose on each other is indicated by hatching.

A center VC1 of the first visual field area VA1 coincides with the startpoint of the target portion X (reference sign “Y1” of FIG. 4A). Inaddition, a center VC2 of the second visual field area VA1 is positionedon a line of the target portion X. The position determination unit 20calculates a size or an area of the superimposition area Z with theassumption that the image pickup device 50 moves from the positioncorresponding to the first visual field area VA1 to the positioncorresponding to the second visual field area VA2 while the center ofthe visual field area remains on the line of the target portion X. Inthis way, for example, a position where the size Z2 of thesuperimposition area Z is less than a predetermined threshold value,i.e., a position corresponding to the visual field area VA2 can becalculated.

In FIG. 9B, the visual field area VA2 of the image pickup device 50arranged in the second position and a visual field area VA3 of the imagepickup device 50 arranged in a third position are indicated by brokenlines, respectively. A center VC3 of the visual field area VA3 ispositioned on the line of the target portion X. The positiondetermination unit 20 calculates a size or an area of thesuperimposition area Z with the assumption that the image pickup device50 is moved in such a manner that the center of the visual field areamoves along the line of the target portion X. Then, the visual fieldarea VA3 corresponding to a position in which, for example, the size Z1of the superimposition area Z is less than a predetermined thresholdvalue.

The position determination unit 20 repeats the position determinationstep described with reference to FIGS. 9A and 9B to determine aplurality of positions of the image pickup devices 50 in which the fullimage of the target portion X can be captured. Then, the respectivepositions of the image pickup device 50 are output from the positiondetermination unit 20 to the position storage unit 22 and storedtherein.

The image pickup program creation unit 24 has a function of creating animage pickup program taught to the robot 100 according to positionalinformation of the image pickup device 50 stored in the position storageunit 22. In other words, the image pickup program includes a teachingcontent for positioning the image pickup device 50 in a position inwhich the image of the target portion X can be captured and executingthe capturing of the image of the target portion X.

The processing program creation unit 26 has a function of creating aprocessing program for processing the workpiece 60. The processingprogram creation unit 26 creates a processing program for processing thetarget portion X based on the position of the target portion X obtainedas a result of simulation of the image pickup program in the virtualspace. Alternatively, the processing program creation unit 26 executesthe image pickup program in an actual work space and then processes animage of the target portion X obtained as a result of the execution tocreate a processing program. The processing program includes content forpositioning the processing tool 104 in a position corresponding to thetarget portion X and executing processing.

FIG. 10 is a flowchart showing a processing flow executed by the robotprogramming apparatus 10 according to one embodiment. For convenience ofdescription, each step is described in a sequential order. However,those skilled in the art would understand that the order of the steps isnot intended to be limited to that in the description, as well as wouldunderstand that some of the steps may be simultaneously executed inparallel.

First, at step S1, the virtual space creation unit 12 creates a virtualspace. In addition, the models of the respective elements including atleast the three-dimensional model of the workpiece 60 are arranged inthe virtual space (see FIG. 3).

At step S2, the target portion designation unit 14 designates the targetportion X whose image is to be captured by the image pickup device 50,on the model of the workpiece 60 in the virtual space. At this time, thetarget portion X is designated, for example, in a workpiece coordinatesystem defined for the workpiece 60. Next, at step S3, a position of thetarget portion X in a reference coordinate system is calculated based ona positional relationship between the workpiece coordinate system andthe reference coordinate system and a position of the target portion Xin the workpiece coordinate system.

Furthermore, at step S4, the visual field designation unit 16 designatesthe visual field area VA of the image pickup device 50. At step S5, apositional relationship between the image pickup device 50 and thetarget portion X is designated. Information designated at steps S4 andS5 are input, for example, by an operator, and used in calculationexecuted by the position determination unit 20. In an alternativeembodiment, the visual field area VA and the positional relationshipbetween the image pickup device 50 and the target portion X may beautomatically calculated based on information specific to the imagepickup device 50, for example, information such as a focal distance, asize of an image to be captured, and a height of the visual field.

Next, at step S6, the position determination unit 20 determines aposition of the image pickup device 50 for capturing an image of thetarget portion X, based on the position of the target portion Xcalculated at step S3, the visual field area VA designated at step S4,and the positional relationship between the image pickup device 50 andthe target portion X designated at step S5.

Next, at step S7, the judgment unit 18 judges whether or not a fullimage of the target portion X can be captured by the image pickup device50 arranged in the position determined at step S6.

When it is determined at step S7 that the full image of the targetportion X cannot be captured, the processing goes on to step S8, atwhich the position determination unit 20 determines a position of theimage pickup device 50 in which a next image pickup step is to beexecuted. An additional position of the image pickup device 50determined at step S8 is, for example, a position that satisfies apredetermined superimposition condition with respect to the visual fieldarea VA of the image pickup device 50 in the latest position, asdescribed above. Step S7 and the subsequent step S8 are repeated untilit is judged at step S7 that the full image of the target portion X canbe captured.

On the other hand, when it is judged that the full image of the targetportion X can be captured at step S7, the processing proceeds to stepS9. At step S9, the position storage unit 22 stores the position of theimage pickup device 50 determined at step S6 and, where applicable, atstep S8.

Next, at step S10, the image pickup program creation unit 24 creates animage pickup program for the robot 100 based on the position of theimage pickup device 50 stored at step S9. The created image pickupprogram is sent to the control device 110 (FIG. 1) for controlling therobot 100. For example, as depicted in FIG. 1, when the image pickupdevice 50 is fixed near the wrist 106 of the robot 100, the robot 100positions the image pickup device 50 in a position taught by the imagepickup program.

FIGS. 11 to 14 are schematic diagrams depicting a robot 110, an imagepickup device 50, and a workpiece 60 arranged in work spaces in anotherexemplary configuration. According to the exemplary configurationdepicted in FIG. 11, the image pickup device 50 is fixed to a jig 72,and the workpiece 60 is fixed to the wrist 106 of the robot 100 througha jig 74. In this case, the robot 100 positions the workpiece 60 in aposition taught by the image pickup program, thereby achieving thepositional relationship between the workpiece 60 and the image pickupdevice 50 in which the image of the target portion X can be captured bythe image pickup device 50.

According to an exemplary configuration depicted in FIG. 12, the imagepickup device 50 is fixed to the wrist 106 of the robot 100, and theworkpiece 60 is fixed to a movable device 76 through the jig 74. Themovable device 76 is an arbitrary movable means other than the robot,which is provided with a movable mechanism unit such as a ball screwdriven by, for example, one or two or more electric motors. The movabledevice 76 is adapted to change at least one of the position and theposture of the workpiece 60. Alternatively, although not depicted in thedrawing, the workpiece 60 may be fixed to the wrist 106 of the robot 100and the image pickup device 50 may be fixed to such a movable element.In either case, the robot 100 is controlled according to the teachingcontent of the image pickup program, thereby achieving the positionalrelationship between the workpiece 60 and the image pickup device inwhich the image pickup device 50 can capture the image of the targetportion X of the workpiece 60.

According to an exemplary configuration depicted in FIG. 13, the imagepickup device 50 and the workpiece 60, respectively, are fixed to wrists106 of different robots 100. In this case, similarly to the otherexamples, at least one of the robots 100 is controlled according to theteaching content of the image pickup program, thereby achieving thepositional relationship between the workpiece 60 and the image pickupdevice 50 in which the image pickup device 50 can capture the image ofthe target portion X of the workpiece 60.

According to an exemplary configuration depicted in FIG. 14, the imagepickup device 50 is fixed to the jig 72, and the workpiece 60 is fixedto the jig 70. In this case, the positional relationship between theimage pickup device 50 and the workpiece 60 is obtained from a positionof the image pickup device 50 at the time of image capturing determinedby the position determination unit 20. Based on the obtained positionalrelationship, one of a position and a posture of the jig 72 to which theimage pickup device 50 is fixed can be adjusted. Then, according to theimage pickup program, the image pickup device 50 is started to capturethe image of the target portion X of the workpiece 60.

EFFECT OF THE INVENTION

According to the robot programming apparatus including the aboveconfiguration, the position of the image pickup device when capturing animage of the target portion is determined in the virtual space, andaccording to the result, an image pickup program is created. The robotexecutes the image pickup step according to the image pickup programbeing taught. Accordingly, the operator can easily determine theposition of the image pickup device at the image pickup step and thuscan execute the image pickup step efficiently.

While various embodiments and modifications of the present inventionhave been described hereinabove, it is apparent to those skilled in theart that operational effects intended by the present invention can alsobe achieved by other embodiments and modifications. Particularly, it ispossible to omit or replace the constituent elements of theabove-described embodiments and modifications, and it is also possibleto add a known means, without departing from the scope of the invention.In addition, it is apparent to those skilled in the art that the presentinvention can be embodied by arbitrarily combining features of theplurality of embodiments disclosed explicitly or implicitly in thepresent specification.

What is claimed is:
 1. A robot programming apparatus for creating arobot program to be taught to a robot which is used to process aworkpiece arranged in a work space, the robot programming apparatuscomprising: a virtual space creation unit for creating a virtual spacethat expresses the work space in three-dimensions; a target portiondesignation unit for designating a target portion whose image is to becaptured by an image pickup device, on a model of the workpiece arrangedin the virtual space; a position determination unit for determining atleast one position of the image pickup device for capturing the image ofthe target portion by the image pickup device in the virtual space; aposition storage unit for storing the at least one position of the imagepickup device determined by the position determination unit; an imagepickup program creation unit for creating an image pickup program to betaught to the robot so that the image pickup device captures the imageof the target portion according to the at least one position of theimage pickup device stored in the position storage unit; and a judgmentunit for judging whether or not the full image of the target portion canbe captured when the image pickup device is arranged in one positiondetermined by the position determination unit, wherein the positiondetermination unit is configured to determine an additional position ofthe image pickup device different from the one position when thejudgment unit judges that the full image of the target portion cannot becaptured, and wherein the position determination unit is configured,when determining a plurality of positions of the image pickup device, todetermine the plurality of positions of the image pickup device so thatthe image pickup device in the respective positions adjacent to eachother has ranges of visual fields so as to superimpose on each otherover a predetermined range, the robot programming apparatus furthercomprising a processing program creation unit for creating a processingprogram for processing the workpiece on a position of the target portionobtained by simulating the image pickup program in the virtual space. 2.The robot programming apparatus according to claim 1, wherein theposition determination unit is configured to determine the at least oneposition of the image pickup device in which the image pickup device hasa predetermined positional relationship with respect to the targetportion.
 3. The robot programming apparatus according to claim 2,wherein the position determination unit includes a visual fielddesignation unit for designating a range of a visual field of the imagepickup device and is configured to determine the at least one positionof the image pickup device in which a full image of the target portioncan be captured, based on the predetermined positional relationshipbetween the image pickup device and the target portion and the range ofthe visual field.
 4. The robot programming apparatus according to claim2, wherein the predetermined positional relationship between the imagepickup device and the target portion is designated by a distance betweenthe image pickup device and the target portion.
 5. The robot programmingapparatus according to claim 4, wherein the distance between the imagepickup device and the target portion is a distance along a directionperpendicular to a surface of the workpiece including the targetportion.
 6. The robot programming apparatus according to claim 1,wherein the target portion is a point, a line, or a plane on the surfaceof the workpiece.
 7. The robot programming apparatus according to claim1, wherein the image pickup program includes a teaching content for therobot that controls a position and a posture of at least one of theimage pickup device and the workpiece.
 8. The robot programmingapparatus according to claim 1, wherein the image pickup programincludes a teaching content for teaching the image pickup device fixedso as to have a predetermined positional relationship determined by theposition determination unit with respect to the workpiece fixed to apredetermined position, so that the image pickup device captures theimage of the target portion of the workpiece.